3.107 \(\int \frac {(a+b \tanh ^{-1}(c x))^2}{(d+c d x)^2} \, dx\)

Optimal. Leaf size=107 \[ -\frac {b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (c x+1)}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (c x+1)}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac {b^2}{2 c d^2 (c x+1)}+\frac {b^2 \tanh ^{-1}(c x)}{2 c d^2} \]

[Out]

-1/2*b^2/c/d^2/(c*x+1)+1/2*b^2*arctanh(c*x)/c/d^2-b*(a+b*arctanh(c*x))/c/d^2/(c*x+1)+1/2*(a+b*arctanh(c*x))^2/
c/d^2-(a+b*arctanh(c*x))^2/c/d^2/(c*x+1)

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {5928, 5926, 627, 44, 207, 5948} \[ -\frac {b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (c x+1)}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (c x+1)}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac {b^2}{2 c d^2 (c x+1)}+\frac {b^2 \tanh ^{-1}(c x)}{2 c d^2} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTanh[c*x])^2/(d + c*d*x)^2,x]

[Out]

-b^2/(2*c*d^2*(1 + c*x)) + (b^2*ArcTanh[c*x])/(2*c*d^2) - (b*(a + b*ArcTanh[c*x]))/(c*d^2*(1 + c*x)) + (a + b*
ArcTanh[c*x])^2/(2*c*d^2) - (a + b*ArcTanh[c*x])^2/(c*d^2*(1 + c*x))

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 627

Int[((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)^(m + p)*(a/d + (c*x)/e)^
p, x] /; FreeQ[{a, c, d, e, m, p}, x] && EqQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && I
ntegerQ[m + p]))

Rule 5926

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(a + b
*ArcTanh[c*x]))/(e*(q + 1)), x] - Dist[(b*c)/(e*(q + 1)), Int[(d + e*x)^(q + 1)/(1 - c^2*x^2), x], x] /; FreeQ
[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rule 5928

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(
a + b*ArcTanh[c*x])^p)/(e*(q + 1)), x] - Dist[(b*c*p)/(e*(q + 1)), Int[ExpandIntegrand[(a + b*ArcTanh[c*x])^(p
 - 1), (d + e*x)^(q + 1)/(1 - c^2*x^2), x], x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 1] && IntegerQ[q] &
& NeQ[q, -1]

Rule 5948

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c*x])^(p
 + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[c^2*d + e, 0] && NeQ[p, -1]

Rubi steps

\begin {align*} \int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{(d+c d x)^2} \, dx &=-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac {(2 b) \int \left (\frac {a+b \tanh ^{-1}(c x)}{2 d (1+c x)^2}-\frac {a+b \tanh ^{-1}(c x)}{2 d \left (-1+c^2 x^2\right )}\right ) \, dx}{d}\\ &=-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac {b \int \frac {a+b \tanh ^{-1}(c x)}{(1+c x)^2} \, dx}{d^2}-\frac {b \int \frac {a+b \tanh ^{-1}(c x)}{-1+c^2 x^2} \, dx}{d^2}\\ &=-\frac {b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac {b^2 \int \frac {1}{(1+c x) \left (1-c^2 x^2\right )} \, dx}{d^2}\\ &=-\frac {b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac {b^2 \int \frac {1}{(1-c x) (1+c x)^2} \, dx}{d^2}\\ &=-\frac {b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}+\frac {b^2 \int \left (\frac {1}{2 (1+c x)^2}-\frac {1}{2 \left (-1+c^2 x^2\right )}\right ) \, dx}{d^2}\\ &=-\frac {b^2}{2 c d^2 (1+c x)}-\frac {b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}-\frac {b^2 \int \frac {1}{-1+c^2 x^2} \, dx}{2 d^2}\\ &=-\frac {b^2}{2 c d^2 (1+c x)}+\frac {b^2 \tanh ^{-1}(c x)}{2 c d^2}-\frac {b \left (a+b \tanh ^{-1}(c x)\right )}{c d^2 (1+c x)}+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c d^2}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c d^2 (1+c x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.14, size = 124, normalized size = 1.16 \[ \frac {-4 a^2+2 a b \log (c x+1)+2 a b c x \log (c x+1)-b (2 a+b) (c x+1) \log (1-c x)-4 b (2 a+b) \tanh ^{-1}(c x)-4 a b+b^2 \log (c x+1)+b^2 c x \log (c x+1)+2 b^2 (c x-1) \tanh ^{-1}(c x)^2-2 b^2}{4 c d^2 (c x+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTanh[c*x])^2/(d + c*d*x)^2,x]

[Out]

(-4*a^2 - 4*a*b - 2*b^2 - 4*b*(2*a + b)*ArcTanh[c*x] + 2*b^2*(-1 + c*x)*ArcTanh[c*x]^2 - b*(2*a + b)*(1 + c*x)
*Log[1 - c*x] + 2*a*b*Log[1 + c*x] + b^2*Log[1 + c*x] + 2*a*b*c*x*Log[1 + c*x] + b^2*c*x*Log[1 + c*x])/(4*c*d^
2*(1 + c*x))

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 101, normalized size = 0.94 \[ \frac {{\left (b^{2} c x - b^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )^{2} - 8 \, a^{2} - 8 \, a b - 4 \, b^{2} + 2 \, {\left ({\left (2 \, a b + b^{2}\right )} c x - 2 \, a b - b^{2}\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{8 \, {\left (c^{2} d^{2} x + c d^{2}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2/(c*d*x+d)^2,x, algorithm="fricas")

[Out]

1/8*((b^2*c*x - b^2)*log(-(c*x + 1)/(c*x - 1))^2 - 8*a^2 - 8*a*b - 4*b^2 + 2*((2*a*b + b^2)*c*x - 2*a*b - b^2)
*log(-(c*x + 1)/(c*x - 1)))/(c^2*d^2*x + c*d^2)

________________________________________________________________________________________

giac [A]  time = 0.16, size = 119, normalized size = 1.11 \[ \frac {1}{8} \, c {\left (\frac {{\left (c x - 1\right )} b^{2} \log \left (-\frac {c x + 1}{c x - 1}\right )^{2}}{{\left (c x + 1\right )} c^{2} d^{2}} + \frac {2 \, {\left (2 \, a b + b^{2}\right )} {\left (c x - 1\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{{\left (c x + 1\right )} c^{2} d^{2}} + \frac {2 \, {\left (2 \, a^{2} + 2 \, a b + b^{2}\right )} {\left (c x - 1\right )}}{{\left (c x + 1\right )} c^{2} d^{2}}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2/(c*d*x+d)^2,x, algorithm="giac")

[Out]

1/8*c*((c*x - 1)*b^2*log(-(c*x + 1)/(c*x - 1))^2/((c*x + 1)*c^2*d^2) + 2*(2*a*b + b^2)*(c*x - 1)*log(-(c*x + 1
)/(c*x - 1))/((c*x + 1)*c^2*d^2) + 2*(2*a^2 + 2*a*b + b^2)*(c*x - 1)/((c*x + 1)*c^2*d^2))

________________________________________________________________________________________

maple [B]  time = 0.06, size = 341, normalized size = 3.19 \[ -\frac {a^{2}}{c \,d^{2} \left (c x +1\right )}-\frac {b^{2} \arctanh \left (c x \right )^{2}}{c \,d^{2} \left (c x +1\right )}-\frac {b^{2} \arctanh \left (c x \right ) \ln \left (c x -1\right )}{2 c \,d^{2}}-\frac {b^{2} \arctanh \left (c x \right )}{c \,d^{2} \left (c x +1\right )}+\frac {b^{2} \arctanh \left (c x \right ) \ln \left (c x +1\right )}{2 c \,d^{2}}-\frac {b^{2} \ln \left (c x -1\right )^{2}}{8 c \,d^{2}}+\frac {b^{2} \ln \left (c x -1\right ) \ln \left (\frac {1}{2}+\frac {c x}{2}\right )}{4 c \,d^{2}}-\frac {b^{2} \ln \left (c x -1\right )}{4 c \,d^{2}}-\frac {b^{2}}{2 c \,d^{2} \left (c x +1\right )}+\frac {b^{2} \ln \left (c x +1\right )}{4 c \,d^{2}}-\frac {b^{2} \ln \left (c x +1\right )^{2}}{8 c \,d^{2}}+\frac {b^{2} \ln \left (-\frac {c x}{2}+\frac {1}{2}\right ) \ln \left (c x +1\right )}{4 c \,d^{2}}-\frac {b^{2} \ln \left (-\frac {c x}{2}+\frac {1}{2}\right ) \ln \left (\frac {1}{2}+\frac {c x}{2}\right )}{4 c \,d^{2}}-\frac {2 a b \arctanh \left (c x \right )}{c \,d^{2} \left (c x +1\right )}-\frac {a b \ln \left (c x -1\right )}{2 c \,d^{2}}-\frac {a b}{c \,d^{2} \left (c x +1\right )}+\frac {a b \ln \left (c x +1\right )}{2 c \,d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctanh(c*x))^2/(c*d*x+d)^2,x)

[Out]

-1/c*a^2/d^2/(c*x+1)-1/c*b^2/d^2*arctanh(c*x)^2/(c*x+1)-1/2/c*b^2/d^2*arctanh(c*x)*ln(c*x-1)-1/c*b^2/d^2*arcta
nh(c*x)/(c*x+1)+1/2/c*b^2/d^2*arctanh(c*x)*ln(c*x+1)-1/8/c*b^2/d^2*ln(c*x-1)^2+1/4/c*b^2/d^2*ln(c*x-1)*ln(1/2+
1/2*c*x)-1/4/c*b^2/d^2*ln(c*x-1)-1/2*b^2/c/d^2/(c*x+1)+1/4/c*b^2/d^2*ln(c*x+1)-1/8/c*b^2/d^2*ln(c*x+1)^2+1/4/c
*b^2/d^2*ln(-1/2*c*x+1/2)*ln(c*x+1)-1/4/c*b^2/d^2*ln(-1/2*c*x+1/2)*ln(1/2+1/2*c*x)-2/c*a*b/d^2*arctanh(c*x)/(c
*x+1)-1/2/c*a*b/d^2*ln(c*x-1)-1/c*a*b/d^2/(c*x+1)+1/2/c*a*b/d^2*ln(c*x+1)

________________________________________________________________________________________

maxima [B]  time = 0.33, size = 277, normalized size = 2.59 \[ -\frac {1}{2} \, {\left (c {\left (\frac {2}{c^{3} d^{2} x + c^{2} d^{2}} - \frac {\log \left (c x + 1\right )}{c^{2} d^{2}} + \frac {\log \left (c x - 1\right )}{c^{2} d^{2}}\right )} + \frac {4 \, \operatorname {artanh}\left (c x\right )}{c^{2} d^{2} x + c d^{2}}\right )} a b - \frac {1}{8} \, {\left (4 \, c {\left (\frac {2}{c^{3} d^{2} x + c^{2} d^{2}} - \frac {\log \left (c x + 1\right )}{c^{2} d^{2}} + \frac {\log \left (c x - 1\right )}{c^{2} d^{2}}\right )} \operatorname {artanh}\left (c x\right ) + \frac {{\left ({\left (c x + 1\right )} \log \left (c x + 1\right )^{2} + {\left (c x + 1\right )} \log \left (c x - 1\right )^{2} - 2 \, {\left (c x + {\left (c x + 1\right )} \log \left (c x - 1\right ) + 1\right )} \log \left (c x + 1\right ) + 2 \, {\left (c x + 1\right )} \log \left (c x - 1\right ) + 4\right )} c^{2}}{c^{4} d^{2} x + c^{3} d^{2}}\right )} b^{2} - \frac {b^{2} \operatorname {artanh}\left (c x\right )^{2}}{c^{2} d^{2} x + c d^{2}} - \frac {a^{2}}{c^{2} d^{2} x + c d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2/(c*d*x+d)^2,x, algorithm="maxima")

[Out]

-1/2*(c*(2/(c^3*d^2*x + c^2*d^2) - log(c*x + 1)/(c^2*d^2) + log(c*x - 1)/(c^2*d^2)) + 4*arctanh(c*x)/(c^2*d^2*
x + c*d^2))*a*b - 1/8*(4*c*(2/(c^3*d^2*x + c^2*d^2) - log(c*x + 1)/(c^2*d^2) + log(c*x - 1)/(c^2*d^2))*arctanh
(c*x) + ((c*x + 1)*log(c*x + 1)^2 + (c*x + 1)*log(c*x - 1)^2 - 2*(c*x + (c*x + 1)*log(c*x - 1) + 1)*log(c*x +
1) + 2*(c*x + 1)*log(c*x - 1) + 4)*c^2/(c^4*d^2*x + c^3*d^2))*b^2 - b^2*arctanh(c*x)^2/(c^2*d^2*x + c*d^2) - a
^2/(c^2*d^2*x + c*d^2)

________________________________________________________________________________________

mupad [B]  time = 1.25, size = 97, normalized size = 0.91 \[ \frac {b^2\,{\mathrm {atanh}\left (c\,x\right )}^2+b^2\,\mathrm {atanh}\left (c\,x\right )+2\,a\,b\,\mathrm {atanh}\left (c\,x\right )}{2\,c\,d^2}-\frac {2\,a^2+4\,a\,b\,\mathrm {atanh}\left (c\,x\right )+2\,a\,b+2\,b^2\,{\mathrm {atanh}\left (c\,x\right )}^2+2\,b^2\,\mathrm {atanh}\left (c\,x\right )+b^2}{2\,x\,c^2\,d^2+2\,c\,d^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c*x))^2/(d + c*d*x)^2,x)

[Out]

(b^2*atanh(c*x)^2 + b^2*atanh(c*x) + 2*a*b*atanh(c*x))/(2*c*d^2) - (2*b^2*atanh(c*x)^2 + 2*a*b + 2*b^2*atanh(c
*x) + 2*a^2 + b^2 + 4*a*b*atanh(c*x))/(2*c*d^2 + 2*c^2*d^2*x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {a^{2}}{c^{2} x^{2} + 2 c x + 1}\, dx + \int \frac {b^{2} \operatorname {atanh}^{2}{\left (c x \right )}}{c^{2} x^{2} + 2 c x + 1}\, dx + \int \frac {2 a b \operatorname {atanh}{\left (c x \right )}}{c^{2} x^{2} + 2 c x + 1}\, dx}{d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atanh(c*x))**2/(c*d*x+d)**2,x)

[Out]

(Integral(a**2/(c**2*x**2 + 2*c*x + 1), x) + Integral(b**2*atanh(c*x)**2/(c**2*x**2 + 2*c*x + 1), x) + Integra
l(2*a*b*atanh(c*x)/(c**2*x**2 + 2*c*x + 1), x))/d**2

________________________________________________________________________________________